package edu.unindra.elearning.model;

public class DefaultMateri implements Materi {

	/**
	 * 
	 */
	private static final long serialVersionUID = -6700419551216538553L;
	private String materi, kelas, path, status;

	public DefaultMateri() {
		this(null, null, null, null);
	}

	public DefaultMateri(String materi, String kelas, String path, String status) {
		this.materi = materi;
		this.kelas = kelas;
		this.path = path;
		this.status = status;
	}

	@Override
	public String getMateri() {
		return materi;
	}

	@Override
	public void setMateri(String materi) {
		this.materi = materi;
	}

	@Override
	public String getKelas() {
		return kelas;
	}

	@Override
	public void setKelas(String kelas) {
		this.kelas = kelas;
	}

	@Override
	public String getPath() {
		return path;
	}

	@Override
	public void setPath(String path) {
		this.path = path;
	}

	@Override
	public String getStatus() {
		return status;
	}

	@Override
	public void setStatus(String status) {
		this.status = status;
	}

	@Override
	public boolean equals(Object obj) {
		if (obj == null) {
			return false;
		}

		if (getClass() != obj.getClass()) {
			return false;
		}

		final DefaultMateri other = (DefaultMateri) obj;

		if (this.materi != other.materi
				&& (this.materi == null || !this.materi.equals(other.materi))) {
			return false;
		}

		if (this.kelas != other.kelas
				&& (this.kelas == null || !this.kelas.equals(other.kelas))) {
			return false;
		}

		if (this.path != other.path
				&& (this.path == null || !this.path.equals(other.path))) {
			return false;
		}

		if (this.status != other.status
				&& (this.status == null || !this.status.equals(other.status))) {
			return false;
		}
		return true;
	}

	@Override
	public int hashCode() {
		int hash = 3;

		hash = 47 * hash + (this.materi != null ? this.materi.hashCode() : 0);
		hash = 47 * hash + (this.kelas != null ? this.kelas.hashCode() : 0);
		hash = 47 * hash + (this.path != null ? this.path.hashCode() : 0);
		hash = 47 * hash + (this.status != null ? this.status.hashCode() : 0);
		return hash;
	}

}
